﻿function retrieve() {
    var bootstrapValidator = $(".Retrieve").data('bootstrapValidator');
    bootstrapValidator.validate();
    if (bootstrapValidator.isValid()) {
        layer.confirm('您确定要取消订单吗？', {
            btn: ['确定', '取消'] //按钮
        }, function () {
            $.post("/RollBack/CancelOrder", { orderNo: $("#OrderNo").val() }, function (data) {
                layer.msg(data.Msg, { icon: 1 });
            })
        });
    }
}


$(".Retrieve").bootstrapValidator({
    message: '无效的值',
    feedbackIcons: {
        valid: 'glyphicon glyphicon-ok',
        invalid: 'glyphicon glyphicon-remove',
        validating: 'glyphicon glyphicon-refresh',
    },
    fields: {
        OrderNo: {
            message: '无效的数值',
            validators: {
                notEmpty: {
                    message: '订单编号,不能为空'
                }
            }
        }
    }
})